Field of the Invention
The present invention relates to a communication apparatus and a control method for controlling the communication apparatus.
Description of the Related Art
A communication apparatus such as a smartphone having a wireless local area network (LAN) function can wirelessly communicate with another device by connecting to an access point. Japanese Patent Application Laid-Open No. 2006-261938 discusses a device that displays a two-dimensional code including a service set identifier (SSID) of an access point. The communication apparatus can connect to the access point indicated by the SSID included in the two-dimensional code by reading the two-dimensional code using a camera function.
Further, there is a device which is provided with a direct wireless communication function such as a software access point mode or a Wi-Fi direct function. When the device executes the direct wireless communication function, the device generates an SSID and displays a two-dimensional code that includes the generated SSID. The communication apparatus connects to the device by reading the two-dimensional code.
Further, there is a case where the SSID of the access point is not included in the two-dimensional code displayed by the device. The communication apparatus that has read the above two-dimensional code searches for the device by using address information such as an internet protocol (IP) address or a media access control (MAC) address included in the two-dimensional code, and connects to the device detected in the search operation.
A case in which the device displays a two-dimensional code which does not include the SSID of the access point will be considered. If the read two-dimensional code does not include the SSID of the access point, in order to connect to the device, the communication apparatus has to participate in the same network which the device participates in. If the communication apparatus does not participate in the same network which the device participates in, the communication apparatus cannot connect to the device. On the other hand, even if the communication apparatus does not participate in the same network which the device participates in, the communication apparatus can possibly connect to the device if the direct wireless communication function of the device is used. However, a general user does not fully understand that the user can connect the communication apparatus to the device by using the direct wireless communication function of the device. Accordingly, in a case where the user cannot connect the communication apparatus to the device because the communication apparatus does not participate in the same network which the device participates in, the user does not know how to connect the communication apparatus to the device.